<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<% String path = (String) session.getAttribute("basePath"); %>
<title>SYSAUT</title>
<style type="text/css">
    body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
</style>
<script src="<%=path%>/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript">

	//layout
    dojo.require("dijit.layout.BorderContainer");
    dojo.require("dijit.layout.ContentPane");
    //tree
    dojo.require("dojo.data.ItemFileReadStore");
    dojo.require("dijit.Tree");
    
    //iframe
    dojo.require("dijit.form.Form");
    dojo.require("dijit.form.Button");
    dojo.require("dijit.form.ValidationTextBox");
	    
</script>
<link rel="stylesheet" href="<%=path%>/dijit/themes/claro/claro.css">
<%-- <link rel="stylesheet" href="<%=path%>/dijit/themes/tundra/tundra.css"> --%>

<style type="text/css"> html, body { width: 100%; height: 100%; margin: 0; } </style>
</head>
<body class="claro">
<div dojoType="dijit.layout.BorderContainer" style="width: 100%; height: 100%">
    <div dojoType="dijit.layout.ContentPane" region="top">
        SYSAUT
    </div>
    <div dojoType="dijit.layout.ContentPane" region="leading" style="width: 200px;">

        <div dojoType="dojo.data.ItemFileReadStore" jsId="continentStore" url="menuPrincipal.htm">
		</div> 
		<div dojoType="dijit.tree.ForestStoreModel" jsId="continentModel" store="continentStore"
		query="{tipo:'padre'}" rootId="continentRoot" rootLabel="Menu Principal"
		childrenAttrs="hijos">
		</div>
		<div dojoType="dijit.Tree" id="mytree" model="continentModel" openOnClick="true">
		    <script type="dojo/method" event="onClick" args="item"> 
				dojo.xhrGet({
                	
                	url: continentStore.getValue(item, "url"),

                	
                	form: "",

                	
                	handleAs: "text",

                	
                	timeout: 5000,

                	
                	load: function(response, ioArgs) {
                    
                    	var frameurl = continentStore.getValue(item, "url")+"?titulo="+continentStore.getValue(item, "nombre");
					
						dojo.byId("frm_contenido").src = frameurl;
					
                    
                    	return response;
                	},

                	
                	error: function(response, ioArgs) {
                    	debug.dir(response);
                    	dojo.byId("frm_contenido").src = "";
					
                    	return response;
                	}
            	});

 		</script>
		</div> 

    </div>
    <div dojoType="dijit.layout.ContentPane" region="center">
        <iframe id="frm_contenido" src="" width="100%" height="100%" frameborder="0" > 
        </iframe>
    </div>
    <div dojoType="dijit.layout.ContentPane" region="bottom">
        Bottom pane
    </div>
</div>

</body>
</html>